import service from '@/utils/request'

export const useStaffApi = (id: number) => {
	return service.get('/nb/staff/findById', {
		params: {
			id: id
		}
	})
}

export const useStaffSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.post('/nb/staff/edit', dataForm)
	} else {
		return service.post('/nb/staff/add', dataForm)
	}
}

export const findWorkplace = () => {
	return service.get('/nb/workplace/findAll')
}
export const findOrgan = () => {
	return service.get('/nb/organization/list')
}
